import rxAjax from '@/assets/js/ajax.js';

//工作交接 api接口
export const BpmDeliverApi = {};

BpmDeliverApi.baseUrl= '/api-bpm/bpm/core/bpmDeliver';
BpmDeliverApi.exportUrl= BpmDeliverApi.baseUrl + '/listExport';

//查询列表
BpmDeliverApi.query=function (parameter) {
  var url= BpmDeliverApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
BpmDeliverApi.get =function(pkId) {
  var url= BpmDeliverApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
BpmDeliverApi.save =function(parameter) {
  var url= BpmDeliverApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
BpmDeliverApi.del =function(parameter) {
  var url= BpmDeliverApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//根据移交人ID获取交接信息
BpmDeliverApi.getByDeliverUserId =function(parameter) {
    var url= BpmDeliverApi.baseUrl + '/getByDeliverUserId';
    return rxAjax.postUrl(url,parameter);
}


export  default BpmDeliverApi;

